﻿using System;

enum Gender
{
    male,
    female
}

class Student
{
    private string name;
    private int age;
    private int classNumber;
    private Gender gender;

    public Student(string name, int age, int classNumber, Gender gender)
    {
        
        this.Name = name;
        this.Age = age;
        this.ClassNumber = classNumber;
        this.Gender = gender;
    }

    public string Name
    {
        get
        {
            return name;
        }
        set
        {
            if(value.Length<10||value.Length>50)
                throw new ArgumentException("Name is too long");
            name = value;
        }
    }

    public int Age
    {
        get
        {
            return age;
        }
        set
        {
            if(value<7||value>18)
                throw new ArgumentException("age is not appropriate");
            age = value;
        }
    }

    public int ClassNumber
    {
        get
        {
            return classNumber;
        }
        set
        {
            if(value<1||value>11)
                throw new ArgumentException("class is wrong");
            classNumber = value;
        }
    }

    public Gender Gender
    {
        get
        {
            return gender;
        }
        set
        {
            if(gender!=Gender.male&&gender!=Gender.female)
                throw new ArgumentException("hermaphrodite");
            gender = value;
        }
    }



}

